package com.djmw.mouse.repository;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.djmw.mouse.entity.Industry;

public interface IndustryDao extends PagingAndSortingRepository<Industry, Long>, JpaSpecificationExecutor<Industry> {

	@Modifying
	@Query("DELETE FROM Industry industry WHERE industry.parent.id=?1")
	void deleteLevelOneIndustry(Long id);
}
